package sctu.edu.java.year2016.team06.chenqiang.day20160601.chapter10_1;

/**
 * Created by XQ on 2016/6/1.
 *  将1~100之间的所有正整数存放在一个List集合中，并将集合中索引位置是10的对象从集合中移除。
 */


import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.*;

public class PositiveNumber {
    public static void main(String[] args) {
        List<Integer> list = new LinkedList<>();
        for (int i = 1; i < 101; i++) {
            list.add(i);
        }
        System.out.println("The object in the original collection is:\n" + list);
        list.remove(9);
        Iterator<Integer> it=list.iterator();
        System.out.println("\nAfter the operation of the collection object is:\n");

        while(it.hasNext()){
            System.out.print(it.next()+" ");
        }
    }
}
